home *** CD-ROM | disk | FTP | other *** search
Text File | 2003-07-17 | 34.9 KB | 1,231 lines |
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- // ================= Properties for each section =====================
-
- global float $jasperBigFloat = 100000000.0;
-
- global proc jasperStampProfileProperties(
- string $jasperMode,
- string $currentTool
- )
- {
- global float $jasperBigFloat;
-
- //
- // Profile frameLayout
- //
- frameLayout -l "Stamp Profile" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 5 -style "none";
- rowColumnLayout -nc 2 -cw 1 267 -cw 2 60 -cs 1 5 -cs 2 5;
- // The upper slider/field bounds are determined by compensation
- // mode. They are set in jasperValues.mel
- //
- floatSliderGrp -field true -l "Radius(U)" -cal 1 "right"
- -pre 3 -min 0 -step 0.05 -cw3 72 55 140 radius;
- text -al "left" -l "" radiusUnits;
-
- floatSliderGrp -field true -l "Radius(L)" -cal 1 "right"
- -pre 3 -min 0 -step 0.05 -cw3 72 55 140 lowerRadius;
- text -al "left" -l "" lowerRadiusUnits;
-
- if ( ($currentTool != "selectPaint") && ($currentTool != "setEditPaint")) {
- // opacity slider
- //
- floatSliderGrp -field true -l "Opacity"
- -cal 1 "right" -pre 3
- -min 0.0 -max 1.0 -step 0.05
- -cw3 72 55 140 opacitySlider;
-
- if ($currentTool == "wtPaint"
- || $currentTool == "userPaint"
- || $currentTool == "attrPaint"
- || attrPaintInstCheckTool($currentTool) )
- {
- text -l "";
- floatSliderGrp -field true -l "Value" -pre 3
- -min 0.0 -max 1.0 -step 0.05 -cw3 72 55 140
- colorSlider;
- }
-
- // flood button
- button -w 55 -l "Flood" floodButton;
- }
- setParent ..;
-
- separator -h 5 -style "none";
- rowColumnLayout -nc 9
- -cw 1 48
- -cw 2 38 -cw 3 38 -cw 4 38 -cw 5 38 -cw 6 38 -cw 7 38
- -cw 8 38 -cw 9 38;
- text -al "right" -l "Shape " text1;
- symbolCheckBox -w 33 -h 36 -i "circlePoly.xpm" bsCirclePoly;
- symbolCheckBox -w 33 -h 36 -i "circleGaus.xpm" bsCircleGaus;
- symbolCheckBox -w 33 -h 36 -i "circleSolid.xpm" bsCircleSolid;
- symbolCheckBox -w 33 -h 36 -i "semiCirclePoly.xpm" bsSemiCirclePoly;
- symbolCheckBox -w 33 -h 36 -i "semiCircleSolid.xpm" bsSemiCircleSolid;
- symbolCheckBox -w 33 -h 36 -i "rect.xpm" bsRect;
- symbolCheckBox -w 33 -h 36 -i "lineH.xpm" bsLineH;
- symbolCheckBox -w 33 -h 36 -i "lineV.xpm" bsLineV;
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
- setParent ..; // frameLayout
-
- }
-
-
- global proc jasperValueProperties(
- string $jasperMode,
- string $currentTab,
- string $currentTool,
- int $extendUI,
- string $extendUIProperties
- )
- {
- global float $jasperBigFloat;
-
- setParent $currentTab;
-
- columnLayout -width 365 -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
- //
- // Stamp Profile frameLayout
- //
- jasperStampProfileProperties( $jasperMode, $currentTool );
-
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
-
- //
- // Operation frameLayout
- //
- frameLayout -l "Operation" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false valueOperation;
- columnLayout;
- separator -h 3 -style "none";
- radioButtonGrp -l "" -nrb 4 -cw5 5 90 60 70 70
- -l1 "Replace" -l2 "Add" -l3 "Scale" -l4 "Smooth"
- op0Radio;
- separator -h 3 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
-
- if( $extendUI )
- {
- string $cmd = $extendUIProperties + " "
- + $jasperMode + " "
- + $currentTab + " "
- + $currentTool;
- eval $cmd;
-
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- }
-
- //
- // Value Range frameLayout
- //
- frameLayout -l "Value Range" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false valueRange;
- columnLayout;
- separator -h 3 -style "none";
- floatSliderGrp -field true -l "Paint Offset" -cal 1 "right"
- -pre 2 -cw3 115 55 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- ptOffset;
-
- separator -h 3 -style "none";
- floatSliderGrp -field true -l "Paint Mult" -cal 1 "right"
- -pre 2 -cw3 115 55 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- ptMult;
- separator -h 3 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 5 -style "none";
- separator -h 5 -style "none";
- separator -h 5 -style "none";
-
-
- //
- // Clamping frameLayout
- //
- frameLayout -l "Clamping" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false valueClamp;
- columnLayout;
- separator -h 3 -style "none";
- radioButtonGrp -l "" -nrb 4 -cw5 10 60 60 80 80
- -l1 "None" -l2 "Both" -l3 "Lower" -l4 "Upper"
- clampRadio;
-
- separator -h 3 -style "none";
-
- floatSliderGrp -field true -l "Clamp Lower" -cal 1 "right"
- -pre 2 -cw3 115 55 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- clLower;
-
- separator -h 3 -style "none";
-
- floatSliderGrp -field true -l "Clamp Upper" -cal 1 "right"
- -pre 2 -cw3 115 55 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- clUpper;
- separator -h 3 -style "none";
- setParent ..;
- setParent ..;
-
- if ( $currentTool == "wtPaint" ) {
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
- frameLayout -l "Clusters or Jiggles" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 5 -style "none";
-
- rowColumnLayout -nc 1 -cw 1 320 -co 1 left 60;
- text -label "Select Cluster or Jiggle To Modify";
- setParent ..;
-
- rowColumnLayout -nc 1 -cw 1 320 -co 1 left 120;
- textScrollList -w 320 -h 50 -nr 5 -ams false weightScrollList;
- setParent ..;
-
- separator -h 15 -style "none";
- setParent ..;
- setParent ..;
- }
-
- setParent ..;
- setParent ..;
- }
-
-
- proc jasperStrokeProperties(
- string $currentTab,
- string $currentTool
- )
- {
- setParent $currentTab;
-
- columnLayout -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Reflect Paint frameLayout
- //
- frameLayout -l "Reflect Paint" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false reflectionFrameL;
- columnLayout;
- separator -h 5 -style "none";
- checkBoxGrp -ncb 1 -cw2 113 250 -l "Reflection"
- -l1 "On/Off" reflectStrokeChkBox;
-
- separator -h 5 -style "none";
- rowColumnLayout -nc 3 -cw 1 104 -cw 2 186 -cw 3 45;
- columnLayout;
- radioButtonGrp -l "" -nrb 1 -cw2 6 98
- -l1 "U Dir" refPaint0Radio;
- radioButtonGrp -l " " -scl refPaint0Radio
- -nrb 1 -cw2 6 98 -l1 "V Dir" refPaint1Radio;
- if ( $currentTool != "paintColor" ) {
- radioButtonGrp -l " " -scl refPaint0Radio
- -nrb 1 -cw2 6 98 -l1 "Multiple Surf" refPaint2Radio;
- }
- setParent ..;
-
- columnLayout;
- floatSliderGrp -field true -l "" -cw3 1 45 125
- -columnAttach3 "both" "both" "both"
- -min 0.0 -max 1.0 -ss 0.05 -v 0.5
- singleUSlider;
-
- floatSliderGrp -field true -l "" -cw3 1 45 125
- -columnAttach3 "both" "both" "both"
- -min 0.0 -max 1.0 -v 0.5 -ss 0.05
- singleVSlider;
- setParent ..;
-
- columnLayout -adjustableColumn true;
- button -w 45 -l "Reset" reflectUButton;
- button -w 45 -l "Reset" reflectVButton;
- setParent ..;
- setParent ..;
-
- // display the reference vector checkbox only for putty context
- if ( $currentTool == "putty" ) {
- rowColumnLayout -nc 2 -cw 1 170 -cw 2 100;
- text -al "right" -l "Invert Reference Vector ";
- checkBoxGrp -ncb 1 -cw2 170 100 -l1 "On/Off" invertVectorChkBox;
- setParent ..;
- }
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Stylus Pressure frameLayout
- //
- frameLayout -l "Stylus Pressure" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- radioButtonGrp -l "" -nrb 4 -cw5 10 80 80 80 70
- -l1 "None" -l2 "Opacity" -l3 "Radius" -l4 "Both"
- pressure0Radio;
- setParent ..;
- setParent ..;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Profile Alignment frameLayout
- //
- frameLayout -l "Profile Alignment" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- radioButtonGrp -nrb 2 -l "" -cw3 15 190 100
- -l1 "U Tangent" -l2 "V Tangent"
- compRef0Radio;
- radioButtonGrp -l "" -scl compRef0Radio -nrb 2 -cw3 15 190 110
- -l1 "Up Vector" -l2 "Path Direction"
- compRef1Radio;
- setParent ..;
- setParent ..;
-
- setParent ..;
- setParent ..;
- }
-
-
- proc jasperSeamCommCornerProperties( )
- {
- columnLayout;
- separator -h 7 -style "none";
- rowColumnLayout -nc 4 -cw 1 110 -cw 2 5 -cw 3 5 -cw 4 220;
-
- columnLayout;
- radioButtonGrp -l "Display" -nrb 1 -cw2 62 48
- -cal 1 "right" -cal 2 "left"
- -l1 "Off" commCornerDisplay0;
- radioButtonGrp -l "" -scl commCornerDisplay0 -nrb 1 -cw2 62 48
- -cal 1 "right" -cal 2 "left"
- -l1 "On" commCornerDisplay1;
- setParent ..;
-
- separator -hr false -h 90;
- separator -h 3 -style "none";
-
- columnLayout;
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- setParent ..;
- setParent ..;
- setParent ..;
- }
-
-
- proc jasperSeamCommEdgeProperties( )
- {
- columnLayout;
- separator -h 7 -style "none";
- rowColumnLayout -nc 4 -cw 1 110 -cw 2 5 -cw 3 5 -cw 4 220;
- columnLayout;
- radioButtonGrp -l "Display" -nrb 1 -cw2 62 48
- -cal 1 "right" -cal 2 "left"
- -l1 "Off" commEdgesDisplay0;
- radioButtonGrp -l "" -scl commEdgesDisplay0 -nrb 1 -cw2 62 48
- -cal 1 "right" -cal 2 "left"
- -l1 "One" commEdgesDisplay1;
- radioButtonGrp -l "" -scl commEdgesDisplay0 -nrb 1 -cw2 62 48
- -cal 1 "right" -cal 2 "left"
- -l1 "All" commEdgesDisplay2;
- setParent ..;
-
- separator -hr false -h 90;
- separator -h 3 -style "none";
-
- columnLayout;
- separator -h 3 -style "none";
- rowColumnLayout -nc 2 -cw 1 130 -cw 2 90;
- text -w 128 -h 15 -al "left" -l "From Surface" commEdge1Text;
- text -w 80 -h 15 -al "left" -l "Edge" commEdge2Text;
- textFieldGrp -ed false -cw2 1 128
- -label "" commEdgeRefPainterName;
- textFieldGrp -ed false -cw2 1 65
- -label "" commEdgeRefPainterEdge;
-
- separator -h 3 -style "none";
- separator -h 3 -style "none";
-
- text -w 128 -h 15 -al "left" -l "To Surface" commEdge3Text;
- text -w 80 -h 15 -al "left" -l "Edge" commEdge4Text;
- textFieldGrp -ed false -cw2 1 128
- -label "" commEdgeTarPainterName;
- textFieldGrp -ed false -cw2 1 65
- -label "" commEdgeTarPainterEdge;
- setParent ..;
-
- separator -h 5 -style "none";
-
- rowColumnLayout -nc 4 -cw 1 40 -cw 2 80 -cw 3 80 ;
- separator -h 8 -style "none";
- button -l "Prev" commEdgeDisplayOnePrev;
- button -l "Next" commEdgeDisplayOneNext;
- setParent ..;
- setParent ..;
- separator -h 3 -style "none";
- setParent ..;
-
- separator -h 3 -style "none";
-
- setParent ..;
- }
-
-
- proc jasperSeamProperties(
- string $currentTab,
- string $currentTool
- )
- {
- setParent $currentTab;
-
- columnLayout -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 350;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Brush Mode frameLayout
- //
- if ( $currentTool == "putty" || $currentTool == "wtPaint"
- || $currentTool == "userPaint" || $currentTool == "attrPaint"
- || attrPaintInstCheckTool($currentTool) )
- {
- frameLayout -l "Brush Mode" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false brushModeLayout;
- columnLayout;
-
- radioButtonGrp -l "" -nrb 3 -cw4 10 115 105 120
- -l1 "Paint Surfaces" -l2 "Select Edges" -l3 "Select Corners"
- -columnAttach4 both both both both
- brushOperationType;
- setParent ..;
- setParent ..;
-
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- separator -h 12 -style "none";
- }
-
-
- //
- // Seam AutoCreation frameLayout
- //
- frameLayout -l "Seam Auto-creation" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false seamAutoLayout;
- columnLayout;
-
- if( $currentTool == "putty" || $currentTool == "wtPaint"
- || $currentTool == "userPaint" || $currentTool == "attrPaint"
- || attrPaintInstCheckTool($currentTool) )
- {
- separator -h 7 -style "none";
- text -w 100 -al "left" -l "Multi Surfaces:";
- rowColumnLayout -nc 2 -cw 1 320 -cw 2 30;
-
- floatSliderGrp -field true -cw3 120 60 140 -l "Seam Tolerance"
- -columnAttach3 "both" "both" "both"
- -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
- commEdgesTol;
- text -al "left" -l "" commEdgesTolUnits;
-
- floatSliderGrp -field true -cw3 120 60 140 -l "Min. Length"
- -columnAttach3 "both" "both" "both"
- -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
- commEdgesMinLength;
- text -al "left" -l "" commEdgesMinLengthUnits;
- setParent ..;
- }
-
- separator -h 8 -style "none";
- text -w 100 -al "left" -l "Single Surface:";
- rowColumnLayout -nc 2 -cw 1 320 -cw 2 30;
- floatSliderGrp -field true -cw3 120 60 140 -l "Seam & Pole Tol."
- -columnAttach3 "both" "both" "both"
- -pre 4 -cal 1 "right" -min 0.0001 -max 1.0 -ss 0.05
- collapseCVTol;
- text -al "left" -l "" collapseCVTolUnits;
-
- separator -h 10 -style "none";
- setParent ..;
-
- setParent ..;
- setParent ..;
-
- separator -h 15 -style "none";
- separator -h 15 -style "none";
- separator -h 15 -style "none";
-
- //
- // Common Edge/Corner frameLayout
- //
- if ( $currentTool == "putty" || $currentTool == "wtPaint"
- || $currentTool == "userPaint" || $currentTool == "attrPaint"
- || attrPaintInstCheckTool($currentTool) )
- {
- frameLayout -lv false -la "center" -li 5
- -bv false -collapse false -collapsable false commEdgeCornerLayout;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
- separator -h 18 -style "none";
-
- string $tabs = `tabLayout`;
- frameLayout -bs "etchedIn" -lv false CommEdge;
- jasperSeamCommEdgeProperties;
- setParent ..;
- frameLayout -bs "etchedIn" -lv false CommCorner;
- jasperSeamCommCornerProperties;
- setParent ..;
-
- tabLayout -edit -tabLabel CommEdge "Common Edge"
- -tabLabel CommCorner "Common Corner"
- $tabs;
- setParent ..;
- setParent ..;
- setParent ..;
- }
-
- //
- // Stitching Mode frameLayout
- // - this is only displayed in the puttyContext
- //
- if ( $currentTool == "putty" ) {
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
- frameLayout -l "Stitching Mode" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false puttyStitchLayout;
- columnLayout;
- if(!`about -mac`)
- separator -h 3 -style "none";
- radioButtonGrp -l "Edges" -nrb 3 -cw4 70 55 80 80
- -l1 "Off" -l2 "Position" -l3 "Tangent" stitchTypeRadio;
-
- rowColumnLayout -nc 2 -cw 1 170 -cw 2 95;
- columnLayout;
- checkBoxGrp -l "Corners" -ncb 1 -cw2 90 80
- -l1 "On/Off" stitchCornerChkBox;
- checkBoxGrp -l "Pole CVs" -ncb 1 -cw2 90 80
- -l1 "On/Off" stitchPoleCVChkBox;
- setParent ..;
-
- columnLayout;
- separator -h 15 -style "none";
- button -l " Stitch Now " -h 27 -w 90 stitchNowButton;
- setParent ..;
-
- setParent ..;
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
- }
- //
- // Common Edge Value Averaging
- // - this is only displayed if we are in wtPaint or userPaint
- //
- else if ( $currentTool == "wtPaint" || $currentTool == "userPaint"
- || $currentTool == "attrPaint"
- || attrPaintInstCheckTool($currentTool) )
- {
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- frameLayout -l "Common Edge Value Averaging" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false valueStitchLayout;
- columnLayout -adj true;
- separator -h 5 -style "none";
- checkBoxGrp -l "Averaging Seam" -ncb 1 -cw2 150 100
- -l1 "On/Off" averageEdgeValues;
- checkBoxGrp -l "Averaging Pole CVs" -ncb 1 -cw2 150 100
- -l1 "On/Off" averagePoleCVValues;
- setParent ..;
- setParent ..;
- }
-
- setParent ..;
- setParent ..;
- }
-
-
-
- proc jasperMaskProperties(
- string $currentTab
- )
- {
- setParent $currentTab;
-
- columnLayout -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Vert Mask frameLayout
- //
- frameLayout -l "Masking" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 10 -style "none";
- radioButtonGrp -l "" -nrb 3 -cw4 5 52 130 138
- -l1 "Off" -l2 "Selected Vertices" -l3 "Unselected Vertices"
- cvMaskType;
-
- separator -h 10 -style "none";
- checkBoxGrp -ncb 1 -cw2 125 220 -l "Display Vertices"
- -l1 "(only in object mode)" -cal 1 "right" cvMaskDisplay;
- separator -h 10 -style "none";
- setParent ..;
- setParent ..;
-
- setParent ..;
- setParent ..;
- setParent ..;
- }
-
-
- proc jasperMapProperties(
- string $currentTab,
- string $currentTool
- )
- {
- setParent $currentTab;
-
- columnLayout -width 365 -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Import Map frameLayout
- //
- frameLayout -l "Import Attribute Map" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 5 -style "none";
- text -al "right" -l " Map Name:";
- separator -h 10 -style "none";
-
- rowColumnLayout -nc 3 -cs 1 5 -cw 1 180
- -cs 2 5 -cw 2 60 -cs 3 5 -cw 3 60;
- textFieldGrp -cw 1 180 importMapNameField;
- button -l "Reload" importReloadButton;
- button -l "Browse..." importMapButton;
- separator -h 10 -style "none";
- setParent ..;
-
- columnLayout -cat "left" 30;
- checkBoxGrp -cw2 170 150
- -l "Reassign Attribute Maps " -l1 " "
- reassignMapsChkBox;
- separator -h 10 -style "none";
-
- radioButtonGrp -l "Import Value " -nrb 2
- -cw3 100 100 100
- -la2 "Alpha" "Luminance"
- importMapAlphaValueRadio1;
- radioButtonGrp -nrb 3
- -l ""
- -cw4 100 50 50 50
- -la3 "R" "G" "B"
- -scl "importMapAlphaValueRadio1"
- importMapAlphaValueRadio2;
- if ( attrPaintInstCheckTool($currentTool) ) {
- string $name = eval("attrPaintCtx -q -bcn `currentCtx`");
- if ( $name == "polyClrVertPaint" ) {
- radioButtonGrp -nrb 2
- -l ""
- -cw3 100 100 100
- -la2 "RGB" "RGBA"
- -scl "importMapAlphaValueRadio1"
- importMapAlphaValueRadio3;
- }
- }
- separator -h 15 -style "none";
- setParent ..;
-
- // display the treshhold for select context only
- if ( $currentTool == "selectPaint" ) {
- columnLayout -cat "left" 30;
- floatSliderGrp -field true -l "Threshold "
- -cw3 80 60 100 -pre 3
- -min 0.000 -max 1.0 -v 0.5 -step 0.05
- importSelectCVThresholdSlider;
- separator -h 10 -style "none";
- setParent ..;
- }
-
- setParent ..;
- setParent ..;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Export Map frameLayout
- //
- if ( ( $currentTool == "wtPaint" ) ||
- ( $currentTool == "userPaint") ||
- ( $currentTool == "attrPaint") ||
- ( attrPaintInstCheckTool($currentTool) ) ||
- ( $currentTool == "selectPaint") )
- {
- frameLayout -l "Export Attribute Map" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 5 -style "none";
- text -al "right" -l " Map Name: ";
- separator -h 5 -style "none";
-
- rowColumnLayout -nc 3 -cs 1 5 -cw 1 180
- -cs 2 5 -cw 2 60 -cs 3 5 -cw 3 60;
- textFieldGrp -cw 1 180 exportMapNameField;
- button -l "Resave" exportReloadButton;
- button -l "Browse..." exportMapButton;
- separator -h 5 -style "none";
- setParent ..;
-
- // determine if this is 3d or 1d paint
- //
- string $name = "";
- if ( attrPaintInstCheckTool($currentTool) ) {
- $name = eval("attrPaintCtx -q -bcn `currentCtx`");
- }
-
- // if this is not 3d color paint tool (1d case)
- //
- if ( $name != "polyClrVertPaint" ) {
- columnLayout -cat "left" 30;
- separator -h 10 -style "none";
- radioButtonGrp -l "Export Value " -nrb 2
- -cw3 100 100 100
- -la2 "Alpha" "Luminance"
- exportMapValueRadio1;
- separator -h 10 -style "none";
- setParent ..;
- } else { // paint color per vertex - 3d case
- columnLayout -cat "left" 30;
- separator -h 10 -style "none";
- radioButtonGrp -l "Export Value " -nrb 3
- -cw4 100 80 80 80
- -la3 "Alpha" "RGB" "RGBA"
- exportMapValueRadio2;
- separator -h 10 -style "none";
- setParent ..;
- }
-
- columnLayout -cat "left" 30;
- intSliderGrp -field true -l "Map Size X" -cw3 85 60 100
- -min 1 -max 8192 -v 256 -ss 256
- exportMapSizeXSlider;
- separator -h 5 -style "none";
-
- intSliderGrp -field true -l "Map Size Y"
- -cw3 85 60 100
- -min 1 -max 8192 -v 256 -ss 256
- exportMapSizeYSlider;
- separator -h 5 -style "none";
-
- checkBoxGrp -cw2 150 150
- -l "Keep Aspect Ratio " -l1 " "
- exportKeepAspectChkBox;
- separator -h 10 -style "none";
-
- rowLayout -nc 2;
- optionMenuGrp -l "Image Format"
- -cw 1 95 imageFormatOptionMenu;
- if (`about -mac` ){
- menuItem -l "TIFF" fileFormatMenuItem0;
- menuItem -l "SGI" fileFormatMenuItem1;
- menuItem -l "Maya IFF" fileFormatMenuItem2;
- menuItem -l "JPEG" fileFormatMenuItem3;
- menuItem -l "Targa" fileFormatMenuItem4;
- menuItem -l "WindowsBitmap" fileFormatMenuItem5;
- menuItem -l "QuickTime Image" fileFormatMenuItem6;
- menuItem -l "QuickDraw" fileFormatMenuItem7;
- menuItem -l "Photoshop" fileFormatMenuItem8;
- menuItem -l "PNG" fileFormatMenuItem9;
- menuItem -l "MacPaint" fileFormatMenuItem10;
- } else {
- menuItem -l "GIF" fileFormatMenuItem0;
- menuItem -l "SoftImage" fileFormatMenuItem1;
- menuItem -l "RLA" fileFormatMenuItem2;
- menuItem -l "TIFF" fileFormatMenuItem3;
- menuItem -l "SGI" fileFormatMenuItem4;
- menuItem -l "Alias PIX" fileFormatMenuItem5;
- menuItem -l "Maya IFF" fileFormatMenuItem6;
- menuItem -l "JPEG" fileFormatMenuItem7;
- menuItem -l "EPS" fileFormatMenuItem8;
- menuItem -l "Quantel" fileFormatMenuItem9;
- }
- setParent ..;
- separator -h 10 -style "none";
- setParent ..;
- setParent ..;
- setParent ..;
- }
- setParent ..;
- setParent ..;
- setParent ..;
- }
-
-
-
- proc jasperDisplayProperties(
- string $currentTab,
- string $currentTool
- )
- {
- global float $jasperBigFloat;
-
- setParent $currentTab;
-
- columnLayout -width 365 -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- //
- // Surface frameLayout
- //
- frameLayout -l "Surface" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 10 -style "none";
- checkBoxGrp -cw2 113 200 -ncb 1 -l " "
- -l1 "Draw Outline" drawOutlineChkBox;
- checkBoxGrp -cw2 140 200 -ncb 1 -l " "
- -l1 "Draw Brush Feedback" brushFeedbackChkBox;
- checkBoxGrp -cw2 140 200 -ncb 1 -l " "
- -l1 "Draw Outline While Painting" drawOutlinePaintingChkBox;
- checkBoxGrp -cw2 113 200 -ncb 1 -l " "
- -l1 "Show Wireframe" showActiveLinesChkBox;
- separator -h 10 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 20 -style "none";
- separator -h 20 -style "none";
- separator -h 20 -style "none";
-
- // Color feedback frameLayout
- // - this is only displayed for wtPaint and userPaint tools
- //
- if ( ($currentTool == "userPaint")
- ||( attrPaintInstCheckTool($currentTool) ) )
- {
- frameLayout -l "Values" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false jasperDisplayValue;
- columnLayout;
- checkBoxGrp -cw2 95 200 -ncb 1 -l ""
- -l1 "Color Feedback" colorFeedbackChkBox;
- checkBoxGrp -cw2 95 200 -ncb 1 -l ""
- -l1 "Disable Lighting" disableLightingChkBox;
- if ( $currentTool == "wtPaint" ) {
- checkBoxGrp -cw2 95 200 -ncb 1 -l ""
- -l1 "Use Set Color" useSetColorChkBox;
- }
- separator -h 5 -style "none";
-
- if ( $currentTab == "Display" && $currentTool == "clothPaint" ) {
- floatSliderGrp -field true -l "Min Color @" -cal 1 "right"
- -pre 2 -cw3 95 50 140
- -min -100.0 -max 100.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- crLower;
- floatSliderGrp -field true -l "Max Color @" -cal 1 "right"
- -pre 2 -cw3 95 50 140
- -min -100.0 -max 100.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- crUpper;
- }
- else {
- floatSliderGrp -field true -l "Min Color @" -cal 1 "right"
- -pre 2 -cw3 95 50 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- crLower;
- floatSliderGrp -field true -l "Max Color @" -cal 1 "right"
- -pre 2 -cw3 95 50 140
- -min -5.0 -max 5.0
- -step 0.1 -fmn (-$jasperBigFloat) -fmx $jasperBigFloat
- crUpper;
- }
-
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
- }
-
- if ( $currentTool == "setEditPaint" ) {
- frameLayout -l "Values" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- checkBoxGrp -ncb 1 -cw2 200 100 -l "Color Feedback "
- -l1 "On/Off" setEditColorFeedbackChkBox;
- checkBoxGrp -ncb 1 -cw2 200 100 -l "Display Active Vertices "
- -l1 "On/Off" setEditDisplayCVsChkBox;
-
- separator -h 15 -style "none";
- setParent ..;
- setParent ..;
- }
-
- setParent ..;
- setParent ..;
-
- setParent ..;
- }
-
-
- proc jasperMiscProperties(
- string $currentTab,
- string $jasperCommand
- )
- {
- setParent $currentTab;
-
- columnLayout -width 365 -cat "both" 1 -adj true;
- rowColumnLayout -nc 2 -cw 1 1 -cw 2 360;
-
- separator -h 10 -style "none";
- separator -h 10 -style "none";
- separator -h 10 -style "none";
-
- //
- // Multiple Surface Detection frameLayout
- //
- frameLayout -l "Multiple Surface Detection" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 8 -style "none";
- text -al "right" -l " Number of Surfaces:";
-
- rowColumnLayout -nc 2 -cw 1 140 -cw 2 260;
- columnLayout;
- radioButtonGrp -l " " -nrb 2 -cw3 8 71 80
- -l1 "Infinite" -l2 "Finite"
- multiSurfaceRadio;
- setParent ..;
-
- columnLayout;
- intSliderGrp -field true -l ""
- -columnAttach3 "both" "both" "both"
- -min 1 -max 15 -v 1 -cw3 1 35 160
- multiSurfaceSizeSlider;
- setParent..;
-
- text -al "center" -l " Use Common Edge Info ";
- checkBoxGrp -ncb 1 -cw2 80 200 -l1 "On/Off" multiSurfaceModeChkBox;
- setParent ..;
- separator -h 8 -style "none";
-
- setParent ..;
- setParent ..;
- setParent ..;
-
- separator -h 5 -style "none";
-
- //
- // Stamp Compensation frameLayout
- //
- frameLayout -l "Stamp Compensation" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- rowColumnLayout -nc 2 -cw 1 145 -cw 2 240;
- columnLayout;
- radioButtonGrp -l "Comp. Mode" -nrb 1 -cw2 85 60
- -l1 "None" comp0Radio;
- radioButtonGrp -l "" -scl comp0Radio -nrb 1 -cw2 85 60
- -l1 "Linear" comp1Radio;
- radioButtonGrp -l "" -scl comp0Radio -nrb 1 -cw2 85 60
- -l1 "Grid" comp2Radio;
- setParent ..;
-
- columnLayout;
- text -l " ";
- text -l " ";
- intSliderGrp -field true -l "" -min 1 -max 10
- -cw3 1 35 80 compGridRadius;
- setParent ..;
- setParent ..;
- separator -h 10 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 5 -style "none";
-
- //
- // Projective Paint frameLayout
- //
- frameLayout -l "Paint Mode" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- rowColumnLayout -nc 1 -cw 1 450;
- columnLayout;
- radioButtonGrp -l " " -nrb 1 -cw2 85 280
- -l1 "Projective Paint (Polygons Only)" paintType0Radio;
- radioButtonGrp -l " " -scl paintType0Radio -nrb 1 -cw2 85 300
- -l1 "UV Texture Paint (NURBS or Polygons)" paintType1Radio;
- setParent ..;
- setParent ..;
- setParent ..;
- setParent ..;
-
- separator -h 5 -style "none";
-
- //
- // Stroke Smoothing frameLayout
- //
- frameLayout -l "Stroke Smoothing" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- separator -h 5 -style "none";
- checkBoxGrp -ncb 1 -cw2 120 80 -l "Texture Space"
- -l1 "On/Off" texSmoothChkBox;
- checkBoxGrp -ncb 1 -cw2 120 80 -l "Screen Space"
- -l1 "On/Off" screenSmoothChkBox;
- intSliderGrp -field true -cw3 120 50 170 -l "Divisions"
- -cal 1 "right" -min 1 -max 10 divisionSlider;
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
-
- separator -h 5 -style "none";
-
- //
- // Pre and Post stroke command frameLayout
- //
- frameLayout -l "MEL Stroke Callbacks" -la "center" -li 5
- -bs "etchedIn" -collapse false -collapsable false;
- columnLayout;
- textFieldGrp -label "Before Stroke Cmd" -cw2 130 210 preStrokeTextField;
- textFieldGrp -label "After Stroke Cmd" -cw2 130 210 postStrokeTextField;
- separator -h 5 -style "none";
- setParent ..;
- setParent ..;
-
- setParent ..;
- setParent ..;
- }
-
-
- global proc loadJasperTabUI(
- string $jasperMode,
- string $parent,
- string $jasperCommand,
- string $cbParent,
- string $colorSliderCB
- )
- {
- string $currentTab = `tabLayout -query -selectTab $parent`;
- int $childCount = `frameLayout -query -nch $currentTab`;
-
- string $currentContext = `currentCtx`;
- string $currentTool = `contextInfo -c $currentContext`;
-
- setParent $parent;
-
- if( 0 == $childCount)
- {
- waitCursor -state on;
-
- // Sculpt tools (nurbs and polys)
- if( $currentTab == "Sculpt" ) {
- jasperSculptProperties(
- $jasperMode, $currentTab, $currentTool, $jasperCommand
- );
- }
- // script paint and attribute paint tools
- else if( $currentTab == "Script_Paint" ) {
- jasperValueProperties(
- $jasperMode, $currentTab, $currentTool, false, ""
- );
- }
- // set membership tool
- else if( $currentTab == "SetMembership" ) {
- jasperSetEditProperties( $jasperMode, $currentTab, $currentTool );
- }
- else if( $currentTab == "Stroke" ) {
- jasperStrokeProperties( $currentTab, $currentTool );
- }
- else if( $currentTab == "Seam" ) {
- jasperSeamProperties( $currentTab, $currentTool );
- updateSeamProperties( $jasperCommand );
- }
- else if( $currentTab == "Mask" ) {
- jasperMaskProperties( $currentTab );
- }
- else if( $currentTab == "Map" ) {
- jasperMapProperties( $currentTab, $currentTool );
- }
- else if( $currentTab == "Display" ) {
- jasperDisplayProperties( $currentTab, $currentTool );
- }
- else if( $currentTab == "Misc" ) {
- jasperMiscProperties( $currentTab, $jasperCommand );
- }
- else if( $currentTab == "Setup" ) {
- jasperSetupProperties( $jasperMode, $currentTab );
- }
- else {
- attrPaintInstPropertiesDefine( $jasperMode, $currentTab, $currentTool );
- }
-
- // Define the callback stuff
- string $selectCmd = "jasperTabMenuChange " + $jasperCommand + " " + $parent;
- tabLayout -e -sc $selectCmd $parent;
- jasperCallback( $jasperCommand, $currentTab, $cbParent, $colorSliderCB );
- jasperValues( $jasperCommand, `currentCtx`, $currentTab );
-
- waitCursor -state off;
- } else {
- updateJasperValues( $jasperCommand, `currentCtx`, $currentTab );
- }
- }
-
-
- proc string createUIOnDemandJasperTab(
- string $parent,
- string $tabLabel
- )
- {
- // Create the child of the tab layout.
- //
- setParent $parent;
-
- string $tab = `frameLayout -width 365 -height 540 -bv false -lv false
- -collapse false -collapsable false $tabLabel`;
-
- // Set the tab label for the child.
- //
- tabLayout -edit -tabLabel $tab $tabLabel $parent;
-
- return $tab;
- }
-
-
- //
- //
- // $jasperMode == "putty", "wtPaint", "selectPaint", "userPaint"
- // $section == "sculpt"/"weight"/"select"/"script", "stroke"
- // "seam", "mask", "file", "display", "misc"
- //
- global proc jasperProperties(
- string $jasperMode,
- string $jasperCommand,
- string $callbackParent,
- string $colorSliderCB,
- int $size,
- string $tabLabel[]
- )
- {
- //
- // create the tab layout for the tool editor
- //
- string $tabName = $jasperMode + "Tabs_L";
- string $fullTabName = `setParent -q` + "|" + $tabName;
-
- if( `tabLayout -ex $fullTabName` )
- {
-
- }
- else {
- string $tabParent = `tabLayout -width 365 -scr false -cr false $tabName`;
-
- //
- // create a callback function when the tab is selected
- //
- string $selectCmd = "loadJasperTabUI " + $jasperMode + " " +
- $tabParent + " " +
- $jasperCommand + " " +
- $callbackParent + " " +
- $colorSliderCB;
- tabLayout -e -preSelectCommand ($selectCmd) $tabParent;
-
-
- //
- // create tab's children
- //
- int $i = 0;
- for( $i = 0; $i < $size; $i++ ) {
- string $tab = `createUIOnDemandJasperTab $tabParent $tabLabel[$i]`;
- }
-
- //
- // load the first tab menu
- //
- loadJasperTabUI( $jasperMode, $tabParent,
- $jasperCommand, $callbackParent, $colorSliderCB
- );
- }
- }
-